1. Field of the Invention
The invention relates to a resolution converting method of image data.
2. Related Background Art
An example of a bilinear resolution converting method is shown below as a background art 1.
First, a coefficient table producing method will be described.
FIG. 9 is a flowchart for a coefficient table producing process in the background art 1. In a step 600 of producing an interpolation pixel position offset, a position offset of an interpolation pixel (interpolation pixel position offset) to a reference pixel which is necessary for producing the table is produced. In a step 601 of calculating coefficients, as shown in FIG. 10, interpolation pixel position offsets d(u) and d(v) calculated in the interpolation pixel position offset producing step are used and assuming thatu ε {0,1}, v ε {0,1},   (1)corresponding coefficients K(u, v) are calculated by the following equation (2).K(u, v)={1−d(u)}{1−d(v)}  (2)In a step 602 of storing the coefficients, the coefficients calculated in the coefficient calculating step 601 are stored into the corresponding location in the table.
A resolution converting method using such a table will now be described.
FIG. 8 is a processing flowchart for the resolution converting method in the background art 1. In a step 500 of calculating a reference address/interpolation pixel position offset, an address of the reference pixel and the position offset of the interpolation pixel (interpolation pixel position offset) to the reference pixel are calculated. In a coefficient deriving step 502, the interpolation pixel position offset calculated in the reference address/interpolation pixel position offset calculating step 500 is used as an index and coefficients are derived from the coefficient table which has previously been produced.
In a reference pixel deriving step 501, pixel data to be referred to is derived by using the reference address calculated in the reference address/interpolation pixel position offset calculating step 500 and the pixel data for the reference.
In an interpolation pixel producing step 503, the coefficient data derived in the coefficient deriving step 502 and the reference pixel data derived in the reference pixel deriving step 501 are used and by multiplying a reference pixel by each of the corresponding coefficients and calculating the sum of the multiplication results, the interpolation pixel data is derived. In an interpolation pixel storing step 504, the interpolation pixel data produced in the interpolation pixel producing step 503 is stored into a memory.
In the background art 1 as mentioned above, there is such a problem that an image is blurred and an adequate picture quality cannot be derived.
An example of a cubic convolution resolution converting method will be described hereinbelow as a background art 2.
Since a coefficient table producing process and a resolution converting process are almost the same as those in the background art 1, only different points will be explained hereinbelow.
Unlike the background art 1, in the coefficient calculating step 601 in the coefficient table producing process, the corresponding coefficients K(u, v) are calculated by using the interpolation pixel position offsets d(u) and d(v) calculated in the interpolation pixel position offset producing step as shown in FIG. 11. Now, assuming that
                              u          ∈                      {                          0              ,              1              ,              2              ,              3                        }                          ,                  v          ∈                      {                          0              ,              1              ,              2              ,              3                        }                          ,                                  ⁢                  k          =                      {                                                                                1                    -                                          2                      ⁢                                                                      d                                                                                      +                                                                                          d                                                                    2                                        +                                                                                          d                                                                    3                                                                                                                                ⁢                                                                  if                        ⁢                                                                                                  ⁢                        0                                            ⩽                                                                      d                                                                    <                      1                                                                                                                                        4                    -                                          8                      ⁢                                                                      d                                                                                      +                                          5                      ⁢                                                                                                  d                                                                          2                                                              -                                                                                          d                                                                    3                                                                                                                                ⁢                                                                  if                        ⁢                                                                                                  ⁢                        1                                            ⩽                                                                      d                                                                    <                      2                                                                                                                    0                                                                                            if                      ⁢                                                                                          ⁢                      2                                        ⩽                                                                d                                                                                                                                                    (        3        )            the coefficients are calculated by the following equation (4).K(u, v)=k(d(u))k(d(v))   (4)
Also in the resolution converting process, a similar process is executed with respect to 16 neighborhood pixels of the interpolation pixel instead of 4 pixels adjacent to the interpolation pixel.
According to the background art 2 as mentioned above, while high frequency components are held and a high picture quality can be derived without blurring an image, since the number of reference pixels is large, there are such problems that the number of memory accessing times is large, an amount of arithmetic operation is large, and a circuit scale increases in the case of realizing such a background art by hardware and a processing burden is heavy in the case of realizing it by software.
As a method of solving such problems, there is a resolution converting method disclosed in Japanese Patent Application Laid-Open No. 2000-69278 and such a method is mentioned as a background art 3.
An embodiment of the resolution converting method of the background art 3 will be described hereinbelow.
First, a coefficient table producing method will be described.
FIG. 13 is a flowchart for the coefficient table producing process in the background art 3. In an interpolation pixel position offset producing step 800, a position offset of an interpolation pixel (interpolation pixel position offset) to the reference pixels necessary for producing a table is produced. In a first coefficient calculating step 801, as shown in an example of FIG. 14, assuming thatu ε {0,1},   (5)in accordance with the interpolation pixel position offset d(u) produced in the interpolation pixel position offset producing step 800, the corresponding coefficient K(u) is calculated by the following equation (6).K(u, v)=1−d(u)   (6)
In a first coefficient storing step 802, the coefficient calculated in the first coefficient calculating step 801 is stored in a corresponding location in the table.
In a second coefficient calculating step 803, as shown in an example of FIG. 15, assuming that
                              u          ∈                      {                          0              ,              1              ,              2              ,              3                        }                          ,                                  ⁢                  k          =                      {                                                                                1                    -                                          2                      ⁢                                                                      d                                                                                      +                                                                                          d                                                                    2                                        +                                                                                          d                                                                    3                                                                                                                                ⁢                                                                  if                        ⁢                                                                                                  ⁢                        0                                            ⩽                                                                      d                                                                    <                      1                                                                                                                                        4                    -                                          8                      ⁢                                                                      d                                                                                      +                                          5                      ⁢                                                                                                  d                                                                          2                                                              -                                                                                          d                                                                    3                                                                                                                                ⁢                                                                  if                        ⁢                                                                                                  ⁢                        1                                            ⩽                                                                      d                                                                    <                      2                                                                                                                    0                                                                                            if                      ⁢                                                                                          ⁢                      2                                        ⩽                                                                d                                                                                                                                                    (        7        )            in accordance with the interpolation pixel position offset d(u) produced in the interpolation pixel position offset producing step 800, the corresponding coefficient K(u) is calculated by the following equation (8).K(u)=k(d(u))   (8)In a second coefficient storing step 804, the coefficient calculated in the second coefficient calculating step 803 is stored in a corresponding location in the table.
A resolution converting process using the table will now be described.
FIG. 12 is a processing flowchart for the resolution converting method in the background art 3. In a horizontal direction reference address/interpolation pixel position offset calculating step 702, an address of the reference pixel and the position offset of the interpolation pixel in the horizontal direction (horizontal direction interpolation pixel position offset) to the reference pixel are calculated. In a vertical direction reference address/interpolation pixel position offset calculating step 703, an address of the reference pixel and the position offset of the interpolation pixel in the vertical direction (vertical direction interpolation pixel position offset) to the reference pixel are calculated.
In an edge detecting step 700, an edge direction is calculated from the image before the resolution converting process by using the pixel data for reference. In an interpolation system determining step 701, as shown in FIGS. 16A and 16B, an interpolation system according to the edge direction detected in the edge detecting step 700 is determined.
In the interpolation system determining step 701, if it is determined that an edge component amount in the vertical direction of the image is large, the following series of processes is executed.
In a horizontal direction first coefficient deriving step 705, the horizontal direction interpolation pixel position offset calculated in the horizontal direction reference address/interpolation pixel position offset calculating step 702 is used as an index and coefficients are derived from a coefficient table which has previously been produced. In a horizontal direction first reference pixel deriving step 704, pixel data to be referred to is derived by using the horizontal direction reference address calculated in the horizontal direction reference address/interpolation pixel position offset calculating step 702 and the pixel data for reference. In a horizontal direction first interpolation pixel producing step 706, the coefficient data derived in the horizontal direction first coefficient deriving step 705 and the reference pixel data derived in the horizontal direction first reference pixel deriving step 704 are used, each reference pixel is multiplied by each of the corresponding coefficients, and the sum of the multiplication results is calculated, thereby deriving the horizontal direction interpolation pixel data. In a horizontal direction first interpolation pixel storing step 707, the interpolation pixel data produced in the horizontal direction first interpolation pixel producing step 706 is stored into a memory.
In a vertical direction second interpolation pixel producing step 709, the vertical direction interpolation pixel position offset calculated in the vertical direction reference address/interpolation pixel position offset calculating step 703 is used as an index and coefficients are derived from a coefficient table which has previously been produced. In a vertical direction second reference pixel deriving step 708, pixel data to be referred to is derived by using the vertical direction reference address calculated in the vertical direction reference address/interpolation pixel position offset calculating step 703 and the pixel data stored in the horizontal direction first interpolation pixel storing step 707. In a vertical direction second interpolation pixel producing step 710, the coefficient data derived in the vertical direction second coefficient deriving step 709 and the reference pixel data derived in the vertical direction second reference pixel deriving step 708 are used, each reference pixel is multiplied by each of the corresponding coefficients, and the sum of the multiplication results is calculated, thereby deriving the interpolation pixel data. In an interpolation pixel storing step 718, the interpolation pixel data produced in the vertical direction second interpolation pixel producing step 710 is stored into the memory.
If it is determined in the interpolation system determining step 701 that an edge component amount in the horizontal direction of the image is large, the following series of processes is executed.
In a horizontal direction second coefficient deriving step 711, the horizontal direction reference address/interpolation pixel position offset calculated in the horizontal direction reference address/interpolation pixel position offset calculating step 702 is used as an index and a coefficient is derived from the coefficient table which has previously been produced. In a horizontal direction second reference pixel deriving step 712, pixel data to be referred to is derived by using the horizontal direction reference address calculated in the horizontal direction reference address/interpolation pixel position offset calculating step 702 and the pixel data for reference. In a horizontal direction second interpolation pixel producing step 713, the coefficient data derived in the horizontal direction second coefficient deriving step 711 and the reference pixel data derived in the horizontal direction second reference pixel deriving step 712 are used, each reference pixel is multiplied by each of the corresponding coefficients, and the sum of the multiplication results is calculated, thereby deriving the horizontal direction interpolation pixel data. In a horizontal direction second interpolation pixel storing step 714, the interpolation pixel data produced in the horizontal direction second interpolation pixel producing step 713 is stored into the memory.
In a vertical direction first coefficient deriving step 715, the vertical direction interpolation pixel position offset calculated in the vertical direction reference address/interpolation pixel position offset calculating step 703 is used as an index and a coefficient is derived from the coefficient table which has previously been produced. In a vertical direction first interpolation pixel deriving step 716, the pixel data to be referred to is derived by using the vertical direction reference address calculated in the vertical direction reference address/interpolation pixel position offset calculating step 703 and the pixel data stored in the horizontal direction second interpolation pixel storing step 714. In a vertical direction first interpolation pixel producing step 717, the coefficient data derived in the vertical direction first coefficient deriving step 715 and the reference pixel data derived in the vertical direction first reference pixel deriving step 716 are used, each reference pixel is multiplied by each of the corresponding coefficients, and the sum of the multiplication results is calculated, thereby deriving the interpolation pixel data. In the interpolation pixel storing step 718, the interpolation pixel data produced in the vertical direction first interpolation pixel producing step 717 is stored into the memory.
As mentioned above, in the background art 3, the bilinear interpolation is executed in the horizontal direction first interpolation pixel producing step 706 and the vertical direction first interpolation pixel producing step 717. The cubic convolution interpolation is executed in the horizontal direction second interpolation pixel producing step 713 and the vertical direction second interpolation pixel producing step 710. If it is determined that edge component amount in the vertical direction of the image is large, the first interpolation pixel producing step 706 is executed in the horizontal direction and the second interpolation pixel producing step 710 is executed in the vertical direction. If it is determined that edge component amount in the horizontal direction of the image is large, the second interpolation pixel producing step 713 is executed in the horizontal direction and the first interpolation pixel producing step 717 is executed in the vertical direction. Thus, the edge portion is not blurred and the picture quality in which a pseudo outline is suppressed can be obtained while reducing a circuit scale of the hardware.